<!DOCTYPE html>
<html charset="UTF-8">
    <head>
        <meta charset="utf-8">
        <link href="__STATIC__/css/style.css" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="{$tpshop_config['shop_info_store_ico']}"/>
        <link rel="stylesheet" href="__STATIC__/css/index.css" type="text/css"> 
        <script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
        <script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
        <script src="__STATIC__/js/slider.js"></script>
        <title>{$tpshop_config.shop_info_store_title}</title>
        <!--菜单样式-->
        <script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
        <script src="__PUBLIC__/js/global.js"></script>
        <!--最顶部-->
  <!--  <div class="site-topbar">
        <div class="layout">
            <div class="t1-l">
                <ul class="t1-l-ul islogin">
                    <li class="t1font"> <a href="{:U('Home/User/index')}" class="logon userinfo"></a></li>
                    <li class="t1img"><a href="{:U('Home/user/logout')}" onclick="return confirm('确认退出吗  否则请取消？');"><b style="color:red;">安全退出</b></a></li>      
                    <li class="t1img">&nbsp;</li>

                </ul>
            </div>
            <div class="t1-r">
                <ul class="t1-r-ul islogin" style="display:none;">                   
                    <li class="t1font"><a href="{:U('Home/User/order_list')}">我的订单</a></li>
                    <li class="t1img">&nbsp;</li>
                    <li class="t1font"><a href="{:U('Home/Cart/cart')}">购物车</a></li>
                    <li class="t1img">&nbsp;</li>
                    <li class="t1font"><a href="{:U('Home/User/withdrawals')}">提现申请</a></li>
                    <li class="t1img">&nbsp;</li>   
                </ul>
            </div>
        </div>
    </div> -->

    <header>

        <div class="layout">

            <!--logo开始-->
            <div class="logo"><a href="/Home/User/index.html" title="{$tpshop_config['shop_info_store_name']}"><img src="{$tpshop_config['shop_info_store_logo']}" alt="{$tpshop_config['shop_info_store_name']}"></a></div>
            <!--logo结束-->

           
            <div class="qr-code">
                <img src="{$tpshop_config['shop_info_store_weixin']}" alt="二维码" />
<!--                <p>扫一扫</p>-->
            </div>
        </div>
    </header>
    <!-- 导航-开始-->


    <div class="navigation">
        <div class="layout">
            <div class="ongoods nav-box" id="navi">
                <ul>
                    <li><a href="/index.php?m=Home&c=User&a=index"><span><img src="__STATIC__/img/user/ico_1.png"></span>首页</a></li>
                    <tpshop sql="SELECT * FROM `__PREFIX__navigation` where is_show = 1 ORDER BY `sort` DESC" key="k" item='v'>
                        <li class="page"><a href="{$v[url]}" <if condition="$v[is_new] eq 1">target="_blank" </if><span>{$v[name]}</span></a></li>
                    </tpshop>
                    <li><a href="/index.php?m=Home&c=User&a=logout" onclick="return confirm('确认退出吗  否则请取消？');"><span><img src="__STATIC__/img/user/ico_7.png"></span>安全退出</a></li>
                    <li style="color:#dfcc70; font-size:14px; margin-left:20px;"> 欢迎您：{$user.account}&nbsp;&nbsp;级别：<i>{$level.level_name}</i></li>
                </ul>
            </div>
        </div>
    </div>
    <!-- 导航-结束-->
    <script>
        $(function () {
            var active_li = '{$active}';
            if (active_li) {
                $('li').remove('curr-res');
                $('#' + active_li).addClass('curr-res');
            }

            var uname = getCookie('uname');
            if (uname == '') {
                $('.islogin').remove();
                $('.nologin').show();
            } else {
                $('.nologin').remove();
                $('.islogin').show();
                $('.userinfo').html(decodeURIComponent(uname));
            }
            get_cart_num();
        })



        function get_cart_num() {
            var cart_cn = getCookie('cn');
            if (cart_cn == '') {
                $.ajax({
                    type: "GET",
                    url: "/index.php?m=Home&c=Cart&a=header_cart_list", //+tab,
                    success: function (data) {
                        cart_cn = getCookie('cn');
                        $('#cart_quantity').html(cart_cn);
                    }
                });
            }
            $('#cart_quantity').html(cart_cn);
        }
        /**
         * 鼠标移动端到头部购物车上面 就ajax 加载
         */
    // 鼠标是否移动到了上方
        var header_cart_list_over = 0;
        $("#header_cart_list > .micart > .les").hover(function () {
            if (header_cart_list_over == 1)
                return false;
            header_cart_list_over = 1;
            $.ajax({
                type: "GET",
                url: "/index.php?m=Home&c=Cart&a=header_cart_list", //+tab,
                success: function (data) {
                    $("#header_cart_list > .micart > .ris").html(data);
                    get_cart_num();
                }
            });
        }).mouseout(function () {

            (typeof (t) == "undefined") || clearTimeout(t);
            t = setTimeout(function () {
                header_cart_list_over = 0; /// 标识鼠标已经离开
            }, 1000);
        });
    </script>